<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<style type="text/css">
.dateWidth1 {
	width: 195px;
}

.select_width {
	width: 130px;
}
</style>
<x:parse xml="${param.xmlstr}" var="xmlData" />

<table class="t_css" width="100%" border="0" cellpadding="0" id="basicInfo"
	cellspacing="1">
	<tr>
		<td   colspan="4" class="t_bar2">平台信息</td>
		
	</tr>
	<tr>
		<td   align="right">平台名称：</td>
		<td  colspan="3">
			<x:out select="$xmlData/data/proposal/zh_title" />
		</td>
	</tr>
	<tr>
		<td align="right">平台所在地点：</td>
		<td colspan="3"><x:out select="$xmlData/data/proposal/address" /></td>
	</tr>
	<tr>
		<td align="right" width="25%">平台认定时间：</td>
		<td width="25%"><x:out select="$xmlData/data/proposal/hold_date" /></td>
		<td align="right" width="25%">认定部门：</td>
		<td width="25%"><x:out select="$xmlData/data/proposal/department" /></td>
	</tr>
	
	<tr>
		<td align="right">项目核准文号<br>或备案号：</td>
		<td colspan="1"><x:out select="$xmlData/data/proposal/prp_review_no" /></td>
		<td align="right" >指南代码：</td>
		<td  valign="middle" >
		<x:out select="$xmlData/data/proposal/guide_code" />
		</td>
	</tr>

	<tr>
		<td align="right">平台类别：</td>
		<td  colspan="3" valign="middle">
		<x:out select="$xmlData/data/proposal/research_name" />
		</td>
	</tr>

	<tr>
		<td align="right">平台性质：</td>
		<td  colspan="3" valign="middle">
		<x:out select="$xmlData/data/proposal/nature_type_name" />
		</td>
	</tr>
	<tr>
		<td align="right">平台服务范围：</td>
		<td  colspan="5" valign="middle">
		<x:out select="$xmlData/data/proposal/service_name" /></td>
	</tr>
	<tr>
		<td align="right" >平台主要功能：</td>
		<td colspan="3">
		<x:out select="$xmlData/data/proposal/function_name" />
		</td>
	</tr>
	<tr>
		<td align="right" >申请日期：</td>
		<td colspan="3">
		<x:out select="$xmlData/data/proposal/submit_date" />
		</td>
	</tr>
	
	<tr>
		<td  align="right" >项目所属产业：</td>
		<td colspan="3"><x:out select="$xmlData/data/proposal/industry_name" /></td>
	</tr>
</table>	

<table class="t_css" width="100%" border="0" cellpadding="0"
	id="basicInfo2" cellspacing="1">
	<tr>
		<td colspan="5" class="t_bar2">平台人员构成情况</td>
	</tr>
	<tr>
		<td align="right" width="20%">平台总人数：</td>
		<td width="20%" align="center"><x:out select="$xmlData/data/proposal/staff_total" /></td>
		<td align="right" width="20%">本科以上学历者占总人数的比例（%）：</td>
		<td  colspan="2" width="20%" align="center">
		<x:out select="$xmlData/data/proposal/junior_college_pre" /></td>
	</tr>
	<tr>
	<td   align="right">研发人数：</td>
	<td align="center">
	<x:out select="$xmlData/data/proposal/research_num" /> 
	</td>
	<td   align="right">占研发机构总人数的比例（%）：</td>
	<td  colspan="2" align="center">
	<x:out select="$xmlData/data/proposal/research_proportion" /> 
	</td>
	</tr>
	<tr>
	<td  align="right">其中：本科以上人数：</td>
	<td align="center">
	<x:out select="$xmlData/data/proposal/master_num1" />
	</td>
	</tr>
	<tr>
	<td align="right" >专职技术服务人员数：</td>
	<td align="center">
	<x:out select="$xmlData/data/proposal/zzjsfw" />
	</td>
	<td  align="right" >占研发机构总人数的比例（%）：</td>
	<td  colspan="2" align="center">
	<x:out select="$xmlData/data/proposal/zzjsfw_num" /> 
	</td>
	</tr>
	<tr>
	<td  align="right">其中：本科以上人数：</td>
	<td align="center">
	<x:out select="$xmlData/data/proposal/master_num2" /> 
	</td>
	</tr>
	 <tr>
		<td align="center" rowspan="2">平台人员学历构成</td>
		<td align="center">博士</td>
		<td align="center">硕士</td>
		<td align="center">本科</td>
		<td align="center">其他</td>
	</tr>
	<tr>

		<td align="center" >
		    <x:out select="$xmlData/data/proposal/junior_college" />
		<td align="center">
	   	 <x:out select="$xmlData/data/proposal/undergraduate" />
		</td >
		<td align="center">
		    <x:out select="$xmlData/data/proposal/master" />
		</td>
		<td align="center">
		    <x:out select="$xmlData/data/proposal/doctor" />
		</td>
	</tr>

	<tr>
		<td align="center" rowspan="2">平台人员职称构成</td>
		<td align="center">高级</td>
		<td align="center">中级</td>
		<td align="center">初级</td>
		<td align="center">其他</td>
	</tr>
	<tr>

		<td align="center">
			<x:out select="$xmlData/data/proposal/assistant_level" />
		</td>
		<td align="center">
			<x:out select="$xmlData/data/proposal/middle_level" />
		</td>
		<td align="center">
			<x:out select="$xmlData/data/proposal/high_level" />
		</td>
		<td align="center">
		<x:out select="$xmlData/data/proposal/other_level" />
			</td>	
	</tr> 
	</table>

<div class="t_bar">
	平台主要设备设施
</div>

<table id="tblEuipments" cellpadding="0" class="table01" width="100%"
	border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
	<thead>
		<tr style="border: 1px solid #B7D1E6">
			<th class="TblHead" align="center" width="5%">序号</th>
			<th class="TblHead" align="center" width="60%">设备名称</th>
			<th class="TblHead" align="center" width="15%">数量（台/套）</th>
			<th class="TblHead" align="center" width="15%">金额（万元）</th>
		</tr>
	</thead>
	<tbody id="tab">
		<c:set value="0" var="index" scope="page" />
		<x:forEach select="$xmlData/data/euipments/euipment" var="euipment">

			<c:choose>
				<c:when test="${index<10}">
					<c:set value="0" var="flag" scope="page" />
				</c:when>
				<c:otherwise>
					<c:set value="" var="flag" scope="page" />
				</c:otherwise>
			</c:choose>
			<tr>
				<td align="center">&nbsp; <span
					name="euipments/euipment[${flag}${index}]@seq_no"><x:out
							select="$euipment/@seq_no" /></span>
				</td>
				<td><x:out select="$euipment/name" /></td>

				<td align="center"><x:out select="$euipment/amount" /></td>
				<td align="center"><x:out select="$euipment/money" /></td>
			</tr>
			<c:set value="${index+1}" var="index" scope="page" />
		</x:forEach>

	</tbody>
</table>
<br />
<table class="t_css" width="100%" border="0" cellpadding="0"
	cellspacing="1">
	<tr>
		<td colspan="4" class="t_bar2">服务收入情况（单位：万元）</td>
	</tr>
	<tr>
		<td width="25%" align="right">大前年度技术性服务收入：</td>
		<td width="25%" align="center">
			<x:out select="$xmlData/data/proposal/thr_service_income" />
		</td>
		<td width="25%" align="right">服务企业数：</td>
		<td width="25%" align="center">
		<x:out select="$xmlData/data/proposal/thr_service_num" />
		</td>
	</tr>
	<tr>
		<td align="right">前年度技术性服务收入：</td>
		<td align="center">
		<x:out select="$xmlData/data/proposal/two_service_income" />
		</td>
		<td align="right">服务企业数：</td>
		<td align="center">
		<x:out select="$xmlData/data/proposal/two_service_num" />
		</td>
	</tr>
	<tr>
		<td align="right">增长率（%）：</td>
		<td align="center">
		<x:out select="$xmlData/data/proposal/two_income_per" />
		</td>
		<td align="right">增长率（%）：</td>
		<td align="center">
		<x:out select="$xmlData/data/proposal/two_num_per" />
		</td>
	</tr>
	<tr>
		<td align="right">上年度技术性服务收入：</td>
		<td align="center">
	   <x:out select="$xmlData/data/proposal/last_service_income" />	
		</td>
		<td align="right">服务企业数：</td>
		<td  align="center">
		<x:out select="$xmlData/data/proposal/last_service_num" />
		</td>
	</tr>
	<tr>
		<td align="right">增长率（%）：</td>
		<td align="center">
		<x:out select="$xmlData/data/proposal/last_income_per" />
		</td>
		<td align="right">增长率（%）：</td>
		<td align="center">
		<x:out select="$xmlData/data/proposal/last_num_per" />
		</td>
	</tr>
</table>

<table class="t_css" width="100%" border="0" cellpadding="0"
	cellspacing="1" id="basicInfo2">
	<tr>
		<td colspan="4" class="t_bar2">申报项目资金情况（单位：万元）</td>
	</tr>
	<tr>
		<td align="right">项目计划投入总额：</td>
		<td colspan="1" width="30%" align="center"><x:out select="$xmlData/data/proposal/investment_budget" /></td>
		<td align="right" width="20%">项目执行期已完成投资：</td>
		<td width="30%" align="center"><x:out select="$xmlData/data/proposal/finsh_budget" /></td>
	</tr>
	<tr>
		<td align="right">申请金额：</td>
		<td align="center"><x:out select="$xmlData/data/proposal/sqje" /></td>
		<td align="right">项目类别：</td>
		<td>
		<x:out select="$xmlData/data/proposal/grant_name" />
		</td>
	</tr>

	<tr>
		<td align="right">支持方式：</td>
		<td><span name="proposal/sponsor_category"><x:out
					select="$xmlData/data/proposal/sponsor_category" /></span></td>

		<td align="right">资金级次：</td>
		<td><span name="proposal/fund_level">市级</span></td>
	</tr>
	<tr>
		<td align="right" >归口管理部门：</td>
		<td><span name="proposal/org_name">无锡市科学技术局</span></td>
		<td align="right">管理类别：</td>
		<td><span name="proposal/manage_category"><x:out
					select="$xmlData/data/proposal/manage_category" /></span></td>
	</tr>
	<tr>
	    <td  align="right">功能分类：</td>
		<td  colspan="3">
		<span name="proposal/grant_function"><x:out select="$xmlData/data/proposal/grant_function" /></span>
		</td>
	</tr>
	<tr>
	<td colspan="4" class="t_bar2">申请资助依据条款
	</tr>
	 <tr>
		<td colspan="4">
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<span name="proposal/policy_foundation"><x:out select="$xmlData/data/proposal/policy_foundation" /></span> 
		</td>
	</tr>
</table>
<br />

<table class="t_css" width="100%" border="0" cellpadding="0" cellspacing="1" id="basicInfo3">
	<tr>
		<td class="t_bar2" colspan="8">人员信息</td>

	</tr>
	<tr>
		<td align="right">项目联系人：</td>
		<td><x:out select="$xmlData/data/proposal/contact_psn_cname" />
		</td>
		<td align="right">联系电话：</td>
		<td><x:out select="$xmlData/data/proposal/contact_psn_tel" />
		</td>
		<td align="right">联系手机：</td>
		<td><x:out select="$xmlData/data/proposal/contact_psn_mobile" />
		</td>
		<td align="right">电子邮箱：</td>
		<td><x:out select="$xmlData/data/proposal/contact_psn_email" />
		</td>
	</tr>
	<tr>
		<td  align="right">项目负责人：</td>
		<td>
		    <span name="proposal/fzr_psnname" ><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/zh_name" /></span>
		</td>
		<td  align="right">联系电话：</td>
		<td  >
		<span name="proposal/fzr_tel" ><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/tel_work" /></span>
		</td>
		<td  align="right">联系手机：</td>
		<td  >
		<span name="proposal/fzr_mobile" ><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/mobile" /></span>
		</td>
		<td  align="right">电子邮箱：</td>
		<td  >
		<span name="proposal/fzr_mail"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/email" /></span>
		</td>
	</tr>
</table>
<script type="text/javascript">
	$(function() {
		cydw('org1');
		cydw('org2');
		service($("#service_value").val());
		changeDrugCategory();
		changeDrugApproval('drug_approvals_td');
		changeDeviceCategory();
	});

	function cydw(id) {
		var count = 0;
		$("#" + id).find("input[type='text']").each(function() {
			if ($.trim($(this).val()) != '') {
				count += 1;
			}
		});
		if (count != 0) {
			$("#" + id).find("input[type='text']").each(function() {
				$(this).addClass("required");
			});
			$("#" + id).find("span[id^='color']").each(function() {
				$(this).css('display', '');
			});
		} else {
			$("#" + id).find("input[type='text']").each(function() {
				$(this).removeClass("required");
			});
			$("#" + id).find("span[id^='color']").each(function() {
				$(this).css('display', 'none');
			});
		}
	}

	function changeDrugCategory() {
		var val = $("#drug_category_value").val();
		var classAttr = "input_css";
		if (val == '03') {
			$("#drug_category").attr("style", "display:");
			$("#drug_category").attr("class", classAttr + " required");
		} else {
			$("#drug_category").attr("style", "display:none");
			$("#drug_category").attr("class", classAttr);
			$("#drug_category").val("");
		}
	}

	function changeDrugApproval(objId) {
		var val = $("#drug_approvals_value").val();
		$("#" + objId).find("label[id^='label0']").each(function() {
			if (val == '02') {
				$(this).attr("style", "display:");
				$("#drug_approvaled_value").addClass("required");
			} else {
				$(this).attr("style", "display:none");
				$("#drug_approvaled_value").removeClass("required");
			}
		});
	}
	function changeDeviceCategory() {
		var val = $("#medicdevice_category_value").val();
		var classAttr = "input_css";
		if (val == '03') {
			$("#medicdevice_category").attr("style", "display:");
			$("#medicdevice_category").attr("class", classAttr + " required");
		} else {
			$("#medicdevice_category").attr("style", "display:none");
			$("#medicdevice_category").attr("class", classAttr);
			$("#medicdevice_category").val("");
		}
	}

	function service(num) {
		$(":input[id^=service_area_]").addClass("gray");
		$(":input[id^=service_area_]").attr("disabled", true);
		if (num == '01') {
			$(":input[id^=service_area_]").val("");
		} else {
			$("#service_area_" + num).removeClass("gray");
			$("#service_area_" + num).attr("disabled", false);
			$(":input[id^=service_area_]").not("#service_area_" + num).val("");
		}

	}
	function setValue(id) {
		if ("service_area_02" == id) {
			$("#service_name").val($("#" + id).val() + "区");
		}
		if ("service_area_03" == id) {
			$("#service_name").val($("#" + id).val() + "开发区");
		}
		if ("service_area_04" == id) {
			$("#service_name").val("其他：" + $("#" + id).val());
		}
	}
	
	function setRate1(){
		var thr_service_income = $("#thr_service_income").val();
		var two_service_income = $("#two_service_income").val();
	//	var staff_total = $("#staff_total").val();
		if (thr_service_income == ''||thr_service_income == 0||two_service_income == ''||two_service_income == 0) {
			$("#two_income_per").val("0.00");
					
		} else {
			$("#two_income_per").val(formatVal((two_service_income * 100 / thr_service_income)-100));
		}
	}
	
	function setRate2(){
		var thr_service_num = $("#thr_service_num").val();
		var two_service_num = $("#two_service_num").val();
	//	var staff_total = $("#staff_total").val();
		if (thr_service_num == ''||thr_service_num == 0||two_service_num == ''||two_service_num == 0) {
			$("#two_num_per").val("0.00");
					
		} else {
			$("#two_num_per").val(
					formatVal((two_service_num * 100 / thr_service_num)-100));
		}
	}
	
	function setRate3(){
		var two_service_income = $("#two_service_income").val();
		var last_service_income = $("#last_service_income").val();
	//	var staff_total = $("#staff_total").val();
		if (last_service_income == ''||last_service_income == 0||two_service_income == ''||two_service_income == 0) {
			$("#last_income_per").val("0.00");
					
		} else {
			$("#last_income_per").val(
					formatVal((last_service_income * 100 / two_service_income)-100));
		}
	}
	
	function setRate4(){
		var two_service_num = $("#two_service_num").val();
		var last_service_num = $("#last_service_num").val();
	//	var staff_total = $("#staff_total").val();
		if (two_service_num == ''||two_service_num == 0||last_service_num == ''||last_service_num == 0) {
			$("#last_num_per").val("0.00");
					
		} else {
			$("#last_num_per").val(
					formatVal((last_service_num * 100 / two_service_num)-100));
		}
	}

	function setPre() {
		var teach_staff = $("#research_staff").val();
		var technology_staff = $("#technology_staff").val();
		var staff_total = $("#staff_total").val();
		if (staff_total == '') {
			$("#research_staff_pre").val("0.00");
			$("#technology_staff_pre").val("0.00");
		} else {
			$("#research_staff_pre").val(
					formatVal(teach_staff * 100 / staff_total));
			$("#technology_staff_pre").val(
					formatVal(technology_staff * 100 / staff_total));
		}

	}

	function setPre1() {
		var teach_staff = $("#research_num").val();
		var staff_total = $("#staff_total").val();
		if (staff_total == '') {
			$("#proportion").val("0.00");
		} else {
			$("#proportion").val(formatVal(teach_staff * 100 / staff_total));
		}
	}
	function initTreeValue2CallBack() {
		cydw('org1');
		cydw('org2');
	}

	function autoCountFund() {
		var count3 = 0;
		var count2 = 0;
		$("#tblEuipments tr:gt(1)").each(
				function() {
					var fund = $(this).children().eq("3").children().val();
					var fund3 = $(this).children().eq("4").children().val();
					if (!$.isNumeric(fund))
						fund = "0";
					if (!$.isNumeric(fund3))
						fund3 = "0";
					count2 = formatNumberAuto(
							(parseFloat(fund) + parseFloat(count2)) + "", 9, 0,
							0);
					count3 = formatNumberAuto(
							(parseFloat(fund3) + parseFloat(count3)) + "", 9,
							4, 2);
				});
		$("#amount_count").val(count2);
		$("#money_count").val(count3);
	}

	function setEmptyValueForTree(id) {
		$("#" + id).val("");
		$("#" + id + "_hideId").val("");
		$("#" + id + "_hideName").val("");
		$("#" + id + "_code").val("");
		$("#" + id + "_value").val("");
		$("#" + id + "_name").val("");
		$(
				"#" + id + ",[name$='/" + id + "_code']" + ",[name$='/" + id
						+ "_name'],[name$='/" + id + "_value']").val("");
		$("#sqdm").val("");
		cydw('org1');
		cydw('org2');
	}
	
	function setPre4(){
		var  zzjsfw=$("#zzjsfw").val();
	    var  staff_total=$("#staff_total").val();
	    if(staff_total==''){
	    	$("#zzjsfw_num").val("0.00");
	    }else{
	    $("#zzjsfw_num").val(formatVal(zzjsfw*100/staff_total));
	    }
	}
	
	function setPre2(){
		var  edu_total=$("#edu_total").val();
	    var  staff_total=$("#staff_total").val();
	    if(staff_total==''){
	    	$("#junior_college_pre").val("0.00");
	    }else{
	    $("#junior_college_pre").val(formatVal(edu_total*100/staff_total));
	    }
	}
</script>

